﻿
namespace BoatNGoat.Logic.Map
{
    public struct MapBox2
    {
        public double Left;
        public double Right;
        public double Top;
        public double Bottom;
    }

    public struct MapCollisionData
    {
        public bool Blocked;
        public bool Water;
        public bool Land;
    }

    /// <summary>
    /// A map! Map coordinates are in tiles, i.e. (1.0, 2.5) is 1 tile across and 2 and a half tiles up.
    /// </summary>
    public interface IMap 
    {
        /// <summary>
        /// The width of the map in tiles.
        /// </summary>
        int Width { get; }

        /// <summary>
        /// The height of the map in tiles.
        /// </summary>
        int Height { get; }

        /// <summary>
        /// The tiles! Need this for the drawing of and such.
        /// </summary>
        Tile[,] Tiles { get; }

        /// <summary>
        /// Collide with the map
        /// Tells you whether the rectangle is touching land or water,
        /// and whether it's an impassable tile.
        /// </summary>
        /// <param name="hitbox">The collision box which must be in tile coordinates.</param>
        /// <returns>Returns data indicating what the box collided with.</returns>
        MapCollisionData Collide(MapBox2 hitbox);
    }
}
